//配置路由中间件，相当于Vue的路由前置守卫。
import 'package:get/get.dart';
import '../controller/userController.dart';


class AuthMiddleware extends GetMiddleware {
  @override
  int? priority = 0;

  @override
  GetPage? onPageCalled(GetPage? page) {
    //检测用户登陆状态
    UserController userController = Get.find<UserController>();
    userController.updateUser();
    return super.onPageCalled(page);
  }
}
